# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=msitools
pkgver=0.101
pkgrel=1
pkgdesc="Set of programs to inspect and build Windows Installer (.MSI) files"
url="https://wiki.gnome.org/msitools"
arch="all"
license="GPL-2.0-or-later LGPL-2.1-or-later"
checkdepends="bash"
makedepends="meson libgsf-dev libgcab-dev bison vala perl
	gobject-introspection-dev"
subpackages="$pkgname-dev $pkgname-lang
	$pkgname-bash-completion"
source="https://download.gnome.org/sources/msitools/$pkgver/msitools-$pkgver.tar.xz
	b08275d549bb12a09a420ef9ccaeb0974e00008a.patch
	"
[ "$CARCH" = "s390x" ] && options="!check" # multiple test failures

build() {
	meson --prefix=/usr _build
	ninja -C _build
}

check() {
	ninja -C _build test
}

package() {
	DESTDIR="$pkgdir" ninja -C _build install
}

sha512sums="4a68884cc22dc917f3d0637791f9ada4cd38a96bdf54832ac2c4266c9a44076e391588422039b3b958d39acf4ebe6ef8ccd3e0f3966d9d93a77faef0354262b7  msitools-0.101.tar.xz
99d159cf99cdadebc90ad5c76dcfeee65a8bd432b928bf0d85386dd1d9e01eedc2b5d6da68a2de7e97759a5881983ede06f21148238536fc1f06fff10cf6a8e8  b08275d549bb12a09a420ef9ccaeb0974e00008a.patch"
